# -*- coding: utf-8 -*-
# @Time    : 2023/6/5 18:29
# @Author  : hy
# @Email   : 1596096369@qq.com
# @File    : get_device.py
# @Software: PyCharm
import os
def get_device():
    a = os.popen('adb devices')
    text1 = a.read()
    device = text1.split(' ')[3].splitlines()[1].split()[0]
    devices = '\''+device+'\''
    a.close()
    return devices

def get_android():
    b = os.popen('adb shell getprop ro.build.version.release')
    text2 = b.read()
    android = text2.split()[0]
    androids = '\''+android+'\''
    b.close()
    return androids